﻿
Partial Class WebForm_StepQuery
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            Me.InitData()
        End If
    End Sub

    '在新增編輯頁按下存檔
    Protected Sub AddDirtyHeader1_Save_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddCleanPlan1.Save_Click
        Me.TabContainer1.ActiveTab = Me.SearchCleanPlanTabPanel
    End Sub

    Public Sub SearchCleanPlan1_WorkHeaderExecute(ByVal sender As Object, ByVal e As System.EventArgs) Handles SearchCleanPlan1.Execute
        Me.AddCleanPlan1.DataAccessMode = FormDataAccessMode.Execute
        Me.BindWorkHeader()
    End Sub

    Protected Sub SearchCleanPlan1_WorkHeaderView(ByVal sender As Object, ByVal e As System.EventArgs) Handles SearchCleanPlan1.View
        Me.AddCleanPlan1.DataAccessMode = FormDataAccessMode.View
        Me.BindWorkHeader()
    End Sub

    Public Sub BindWorkHeader()
        Me.TabContainer1.ActiveTab = Me.AddCleanPlanTabPanel
        Me.AddCleanPlan1.InitData(Me.SearchCleanPlan1.PlanID, Me.SearchCleanPlan1.WorkHeaderID)
        Me.plCleanResult.Visible = True
    End Sub

    Public Sub InitData()
        Me.AddCleanPlan1.InitData(0, 0)
        Me.plCleanResult.Visible = False
    End Sub

End Class
